#!/usr/bin/python
# -*- coding: utf-8 -*-
# @author: 高建平
# @description: 
#
from pydantic_settings import BaseSettings
import os
from config.settings import ENV_FILE,FASTAPI_PROFILE,DEFAULT_FASTAPI_PROFILE


class Settings(BaseSettings):
    LEVEL: str = "INFO"
    PATH: str = "./logs/fastapi-{time:YYYY-MM-DD}.log"
    RETENTION: str = "10 days"
    ROTATION: str = '00:00'

    class Config:
        env_prefix = 'LOG_'
        env_file = ENV_FILE+os.getenv(FASTAPI_PROFILE,DEFAULT_FASTAPI_PROFILE)
        env_file_encoding = 'utf-8'


settings = Settings()

